home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / listings / v_12_01 / pugh / array2d.c < prev   
Encoding:
C/C++ Source or Header  |  1993-11-07  |  353 b   |  15 lines

  1. #define DIM1  1
  2. #define DIM2  1
  3.  
  4. typedef int INT_ARRAY_DIM2[DIM2];
  5.  
  6. INT_ARRAY_DIM2 array_2d[DIM1];
  7. const INT_ARRAY_DIM2 array_2d_of_const[DIM1] = {{1}};
  8.  
  9. void function1 ()
  10. {
  11. INT_ARRAY_DIM2 *pointer_2d = array_2d;
  12. const INT_ARRAY_DIM2 *pointer_2d_to_const_1 = array_2d_of_const;
  13. const INT_ARRAY_DIM2 *pointer_2d_to_const_2 = array_2d;
  14. }
  15.